﻿@{
    Layout = "_Square";
    bool isRequestFollow = ViewData.Get<bool>("isRequestFollow", false);
    bool isFollowed = ViewData.Get<bool>("isFollowed", false);
    bool isSameUser = ViewData.Get<bool>("isSameUser", false);
    bool isAnonymousUser = ViewData.Get<bool>("isAnonymousUser", false);
    bool isSuperAdmin_CurrentUser = ViewData.Get<bool>("isSuperAdmin_CurrentUser", false);
    bool isSuperAdmin_User = ViewData.Get<bool>("isSuperAdmin_User", false);
    bool isQuietly = ViewData.Get<bool>("isQuietly", false);
    bool identificationTypeVisiable = ViewData.Get<bool>("identificationTypeVisiable", false);
    string noteName = ViewData.Get<string>("noteName", string.Empty);
    User user = ViewData.Get<User>("user", null);
    string introduction = ViewData.Get<string>("introduction", "尚未填写简介");
    int integrity = 0;
    string editGroupShow = ViewData.Get<string>("editGroupShow", "编辑分组");
    var display = isFollowed ? string.Empty : "display:none";

    Html.IncludeScript("~/Applications/Group/Scripts/jquery.spb.group.js", ResourceRenderPriority.Last);

    string url;
    if (isAnonymousUser)
    {
        url = SiteUrls.Instance().Login(false, SiteUrls.LoginModal._LoginInModal, SiteUrls.Instance().SpaceHome(user.UserName));
    }
    else
    {
        url = SiteUrls.Instance()._AddFollowedUser(user.UserName, user.UserId);
    }
    if (user.Profile != null)
    {
        integrity = user.Profile.Integrity;
    }

    var currentUser = user;
}
@model User
@section Aside{}
@section Banner{}
<link href="/Themes/Shared/DefaultStyle/css/list.css" rel="stylesheet" type="text/css" />
<link href="/Themes/Shared/DefaultStyle/css/font.css" rel="stylesheet" type="text/css" />
<link href="/Themes/Shared/DefaultStyle/css/huiyuan.css" rel="stylesheet" type="text/css" />
<!--搜索结束-->
<div class="wrapper">
    @Html.Hidden("isQuietly", isQuietly)
    <!--头像开始-->
    <div class="z-pho">
        <div class="z-img">
            <!--符合交友看照片条件-->
            @Html.ShowUserAvatar(Model.UserId, AvatarSizeType.Big, navigateTarget: HyperLinkTarget._self, enableCachingInClient: !isSameUser, isShowUserCard: false)
        </div>
        <div class="z-inum">
            <table width="150" cellspacing="0" cellpadding="0" border="0">
                <tbody>
                    <tr>
                        <td class="brl">
                            <a href="@SiteUrls.Instance().ListFollowedUsers(Url.SpaceKey())" class="f-c8 f16 ff1 fb gdom_more_photo">@Model.FollowedCount</a>
                        </td>
                        <td class="brl">
                            <a class="f-c8 f16 ff1 fb" href="@SiteUrls.Instance().ListFollowers(Url.SpaceKey())">@Model.FollowerCount</a>
                        </td>
                        @*<td>
                            <a class="f-c8 f16 ff1 fb" href="#" menu="#@(Model.UserId)">@Model.ContentCount</a>
                        </td>*@
                    </tr>
                    <tr>
                        <td class="brl"><span class="f-c1 f14">收藏</span></td>
                        <td class="brl"><span class="f-c1 f14">粉丝</span></td>
                        @*<td><span class="f-c1 f14">内容</span></td>*@
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
    <!--头像结束-->

    <div class="z-bg1"></div>
    <!--资料第一部分开始-->
    <div class="z-con1">
        <!--右侧开始-->
        <div class="z-con1r">
            <div class="z-subcon1">
                <div class="z-xq">
                    <div class="z-xql">
                        <span class="f-c1 f16 fb fl mr-5">@Model.UserName</span>
                        <span class="imjs-user-offline">
                            最后登录时间：@Model.LastActivityTime.ToFriendlyDate()
                        </span>
                        <!-- 收藏 -->
                        @{ if (UserContext.CurrentUser!=null){
                        <span class="tn-explain-icon" @if (!isFollowed) { @Html.Raw("style=\"display: none;\"")  }>
                            <span class="tn-icon tn-smallicon-accept">
                            </span><span class="tn-icon-text">已收藏</span>
                        </span>
                        <a @if (isFollowed) { @Html.Raw("style=\"display: none;\"")  } href="@SiteUrls.Instance()._AddFollowedUser(UserContext.CurrentUser.UserName, currentUser.UserId)" plugin="dialog" class="tn-button tn-corner-all tn-button-primary tn-button-text-icon-primary" id="add" name="followed-follower-@currentUser.UserId">
                            <span class="tn-icon tn-smallicon-add"></span><span class="tn-button-text">收藏</span>
                        </a>
                            } }
                        <!-- 收藏-->
                    </div>
                </div>

                <div class="z-xq">
                    <div class="z-xql"><span class="fl z-xqf1">会员等级：</span><span class="fl z-xqf2"><a href="@SiteUrls.Instance().MyRank(Url.SpaceKey())">@Html.UserRankIcon(Model.Rank)</a></span> </div>
                </div>

                <div class="z-xq">
                    <div id="gdom_invite_auth" class="z-xqr">
                        @if (!isSameUser && !isAnonymousUser)
                        { 
                            if (new Authorizer().RecommendItem_Manage(TenantTypeIds.Instance().User()))
                    { 
                        <a href="@SiteUrls.Instance()._RecommendItem(TenantTypeIds.Instance().User(), user.UserId, user.DisplayName, userId: user.UserId)" plugin="dialog" rel="nofollow" class="tn-item-link">推荐</a>
                    }
                        }

                    </div>
                    <div class="z-xql">
                        <span class="fl z-xqf1">身份认证：</span>
                        <span class="fl z-xqf2">@Html.IdentificationType(Model.UserId)
                        @if (identificationTypeVisiable)
{@Html.IdentificationType(user.UserId)}
else
{
    if (currentUser != null && currentUser.UserName == Url.SpaceKey())
    {
        <a href="@SiteUrls.Instance().UpdateIdentification(currentUser.UserName)">申请身份认证</a>
    }
}
                        </span>
                    </div>
                </div>
            </div>

            <div class="z-subcon2">
                <table width="770" cellspacing="0" cellpadding="0" border="0">
                    <tbody>
                        <tr>
                            <td colspan="6"><p class="z-detail"><span>@(Model.Profile.Gender == GenderType.Male ? "男" : "女")</span><span>29</span><span>@Model.Basecase.Nation</span><span>@Model.Profile.NowAreaCode</span></p></td>
                        </tr>
                        <tr>
                            <td class="w1"><span>身&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;高：</span></td>
                            <td class="w2"><span>@Model.Basecase.Height 厘米</span></td>
                            <td class="w1"><span>学&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;历：</span></td>
                            <td class="w2"><span>@((Model.Profile.EducationExperience != null && Model.Profile.EducationExperience.Count()>0)?Model.Profile.EducationExperience.First().Degree.EnumMetadataDisplay():"未填写")</span></td>
                            <td class="w1"><span>婚姻状况：</span></td>
                            <td class="w2"><span>@Model.Basecase.MaritalStatus</span></td>
                        </tr>
                        <tr>
                            <td class="w1"><span>民&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;族：</span></td>
                            <td class="w2"><span>@Model.Basecase.Nation</span></td>
                            <td class="w1"><span>月&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;薪：</span></td>
                            <td class="w2">@Model.Basecase.Salary</td>
                            <td class="w1"><span>居住情况：</span></td>
                            <td class="w2">@Model.Basecase.TheHousing</td>
                        </tr>
                        <tr>
                            <td class="w1"><span>籍&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;贯：</span></td>
                            <td class="w2">@Model.Profile.NowAreaCode</td>
                            <td class="w1"><span></span></td>
                            <td class="w2"></td>
                            <td class="w1"><span></span></td>
                            <td class="w2"><span></span></td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
        <!--右侧结束-->
        <!--左侧开始-->
        <div class="z-con1l">
            <div class="z-zt">
                
                <p><span>征友ID：</span>@Model.UserId </p>
                <p>
                    <span>状&nbsp;&nbsp;&nbsp;态：</span>
                    征友进行中...
                </p>
                
                      @if (UserContext.CurrentUser != null)
{<p>
        <a class="tn-item-link" href="@SiteUrls.Instance().EditUserProfile(Model.UserName)">编辑资料</a>
        <a class="tn-item-link" href="@SiteUrls.Instance().UpdateIdentification(Model.UserName)">身份认证</a>
        @if (Model.IsAllowEntryControlPannel())
        {
        <a class="tn-item-link" target="_blank" href="@SiteUrls.Instance().ManageHome()">后台</a>
        }
        @Html.Link("注销", SiteUrls.Instance().Logout(), "退出")
    </p>
}
                <span class="ar"></span>
            </div>
        </div>
        <!--左侧结束-->

    </div>
    <!--资料第一部分结束-->
    <!--资料第二部分开始-->
    <div class="z-con2">
        <!--右侧开始-->
        <div class="z-con2r">
            <!--你可能感兴趣的人开始-->
            <div class="z-ti">你可能感兴趣的人</div>
            <div id="gdom_interest_list" class="z-list2">
                @Html.Action("_InterestedWithAllSide", "FindUser", new { pageSize = 5 })
                @*<ul>
                        <!--一条记录开始-->
                        <li>
                            <div class="z-lp2">
                                <a href="#"><img src="/Themes/Shared/DefaultStyle/images/huiyuan-02.jpg" width="80" height="100" /></a>
                            </div>
                            <p class="z-ln2"><a target="_blank" href="#">守護甜心</a></p>
                            <p class="z-ld2">
                                <span class="fr f-c3">27岁</span>
                                <span class="fl f-c3">北京</span>
                            </p>
                        </li>
                        <!--一条记录结束-->
                    </ul>*@
            </div>
            <!--你可能感兴趣的人结束-->
        </div>
        <!--右侧结束-->
        <!--左侧开始-->
        <div class="z-con2l">
            <!--他的照片开始-->
            <div class="z-ti">
                <a class="z-timore" href="javascript:void(0);" id="gdom_invite_up_photo">&gt;&gt;</a>
                <div style="display:none" class="z-xqr1" id="gdom_invite_up_succ">
                    <i></i>
                    <span class=" f-c1">已发出邀请</span>
                </div>
                Ta的照片
            </div>
            <div class="z-plist" id="gdom_photo_list">
                @if (Model.Useralbumrs != null && Model.Useralbumrs.Count() > 0)
                {
                    <div>
                        <ul>
                            @foreach (var temp in Model.Useralbumrs)
                            {
                                <li>
                                    <img src="@temp.FeaturedImage" style=" border:0" />
                                </li>
                            }
                        </ul>
                    </div>
                }
                else
                {
                    <!--无头像开始-->
                    <div class="z-mm">
                        <div class="z-colr"></div>
                        <div class="z-coll"></div>
                        <div class="z-colm">
                            <div class="btn24 mc"><a href="/u/@Model.UserName/settings/useralbums.aspx">上传形象照</a></div>
                        </div>
                    </div>
                }
                <!--无头像结束-->
            </div>
            <!--他的照片结束-->
            <!--内心独白+详细资料+他在找开始-->
            <!--内心独白开始-->
            <div class="z-ti">内心独白</div>
            <div class="z-db">@Model.Profile.Introduction</div>
            <!--内心独白结束-->
            <!--详细资料开始-->
            <div class="z-ti">
                <a class="z-timore" href="javascript:void(0);" id="gdom_invite_complate">&gt;&gt;</a>
                详细资料
            </div>
            <div class="z-db">
                <table width="700" cellspacing="0" cellpadding="0" border="0">
                    <tbody>
                        <tr>
                            <td class="w1"><span>家庭成员：</span></td>
                            <td class="w2"><span>@Model.Basecase.FamilyMembers</span></td>
                            <td class="w1"><span>购车情况：</span></td>
                            <td class="w2">@Model.Basecase.PurchaseCar</td>
                        </tr>
                        <tr>
                            <td class="w1"><span>是否有相亲时间：</span></td>
                            <td class="w2"><span>@Model.Basecase.BlindDate</span></td>
                            <td class="w1"><span>是否有驾照：</span></td>
                            <td class="w2"><span>@Model.Basecase.License</span></td>
                        </tr>
                        <tr>
                            <td class="w1"><span>是否吸烟：</span></td>
                            <td class="w2"><span>@Model.Basecase.Smoking</span></td>
                            <td class="w1"><span>是否饮酒：</span></td>
                            <td class="w2"><span>@Model.Basecase.Drinking</span></td>
                        </tr>
                    </tbody>
                </table>
                <table width="700" cellspacing="0" cellpadding="0" border="0">
                    <tbody>
                        <tr>
                            <td class="w1"><span>是否愿意上门女婿：</span></td>
                            <td class="w2"><span>@Model.Basecase.SonInLaw</span></td>
                            <td class="w1"><span>月薪：</span></td>
                            <td class="w2"><span>@Model.Basecase.Salary</span></td>
                        </tr>
                        <tr>
                            <td class="w1"><span>血&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;型：</span></td>
                            <td class="w2"><span>@Model.Basecase.BloodType</span></td>
                            <td class="w1"><span>体&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;型：</span></td>
                            <td class="w2"><span>@Model.Basecase.Figure</span></td>
                        </tr>
                        <tr>
                            <td class="w1"><span>掌握语言：</span></td>
                            <td class="w2">@Model.Basecase.MasterLanguage </td>
                            <td class="w1"><span>家务：</span></td>
                            <td class="w2">@Model.Basecase.Housework</td>
                        </tr>
                        <tr>
                            <td class="w1"><span>何时结婚：</span></td>
                            <td class="w2"><span>@Model.Basecase.WhenMarried</span></td>
                            <td class="w1"><span>厨艺：</span></td>
                            <td class="w2">
                                <span>
                                    @Model.Basecase.Culinary
                                </span>
                            </td>
                        </tr>
                        <tr>
                            <td class="w1"><span>是否愿意和父母同住：</span></td>
                            <td class="w2"><span>@Model.Basecase.LiveParents</span></td>
                            <td class="w1"><span>喜欢看的电影：</span></td>
                            <td class="w2">
                                <span>
                                    @Model.Basecase.LikeMovie
                                </span>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
            <!--详细资料结束-->
            <!--他在找开始-->
            <div class="z-ti">Ta 在找..</div>
            <div class="z-db1">
                <table width="700" cellspacing="0" cellpadding="0" border="0">
                    <tbody>
                        <tr>
                            <td class="w0"></td>
                            <td class="w1"><span>学&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;历：</span></td>
                            <td class="w2"><span>@Model.Eachrequest.OtherEducation</span></td>


                            <td class="w0"></td>
                            <td class="w1"><span>身&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;高：</span></td>
                            <td class="w2"><span>@Model.Eachrequest.OtherHeight</span></td>
                        </tr>
                        <tr>

                            <td class="w0"></td>
                            <td class="w1"><span>性格：</span></td>
                            <td class="w2"><span>@Model.Eachrequest.OtherCharacter</span></td>

                            <td class="w0"></td>
                            <td class="w1"><span>婚姻状况：</span></td>
                            <td class="w2"><span>@Model.Eachrequest.OtherMaritalStatus</span></td>
                        </tr>
                        <tr>

                            <td class="w0"></td>
                            <td class="w1"><span>住房情况：</span></td>
                            <td class="w2"><span>@Model.Eachrequest.OtherHousingSituation</span></td>

                            <td class="w0"></td>
                            <td class="w1"><span>职&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;业：</span></td>
                            <td class="w2"><span>@Model.Eachrequest.OtherOccupation</span></td>
                        </tr>
                        <tr>

                            <td class="w0"></td>
                            <td class="w1"><span>对象户口：</span></td>
                            <td class="w2"><span>@Model.Eachrequest.OtherRegistered</span></td>

                            <td class="w0"></td>
                            <td class="w1"><span>居住地点：</span></td>
                            <td class="w2"><span>@Model.Eachrequest.OtherPlaceResidence</span></td>
                        </tr>
                        <tr>

                            <td class="w0"></td>
                            <td class="w1"><span>工作地点：</span></td>
                            <td class="w2"><span>@Model.Eachrequest.OtherPlaceWork</span></td>

                            <td class="w0"></td>
                            <td class="w1"></td>
                            <td class="w2"></td>
                        </tr>
                    </tbody>
                </table>
            </div>
            <!--他在找结束-->
            <!--左侧结束-->
        </div>
        <!--资料第二部分结束-->

    </div>

    </div>
